﻿/*@import '../abstracts/variables';*/
$mud-palette-colors: primary, secondary, tertiary, info, success, warning, error, dark;

.md-combobox {
    margin: 0;
    padding: 0;
    position: relative;
    list-style: none;

    &.md-combobox-padding {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

.md-combobox-item {
    width: 100%;
    display: flex;
    position: relative;
    box-sizing: border-box;
    text-align: start;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
    justify-content: flex-start;
    text-decoration: none;
    outline: none;
    min-height: 48px;

    &.md-combobox-item-comfort {
        padding-top: 4px;
        padding-bottom: 4px;
        min-height: 40px;
    }

    &.md-combobox-item-slim {
        padding-top: 2px;
        padding-bottom: 2px;
        min-height: 32px;
    }

    &.md-combobox-item-superslim {
        padding-top: 0;
        padding-bottom: 0;
        min-height: 24px;
    }

    &.md-combobox-item-disabled {
        color: var(--mud-palette-action-disabled) !important;
        cursor: default !important;
        pointer-events: none !important;

        .md-combobox-item-icon {
            color: var(--mud-palette-action-disabled) !important;
        }
    }
}

.md-combobox-item-clickable {
    color: inherit;
    border: 0;
    cursor: pointer;
    margin: 0;
    outline: 0;
    user-select: none;
    border-radius: 0;
    vertical-align: middle;
    background-color: transparent;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;

    &:hover {
        background-color: var(--mud-palette-action-default-hover);
    }
}

.md-combobox-item-gutters {
    padding-left: 16px;
    padding-right: 16px;
}


.md-combobox-item-text {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 4px;
    margin-bottom: 4px;
    padding-inline-start: 8px;
    padding-inline-end: 8px;
}


.md-combobox-item-text-inset {
    padding-left: 56px;
    padding-inline-start: 56px;
    padding-inline-end: unset;
}

.md-combobox-item-icon {
    color: var(--mud-palette-action-default);
    display: inline-flex;
    /*min-width: 56px;*/
    flex-shrink: 0;
    padding-inline-start: 8px;
    padding-inline-end: 8px;
    margin-inline-start: -4px;
    margin-inline-end: 4px;
}

.md-combobox-item-multiselect {
    max-height: 32px;

    &.md-combobox-item-multiselect-checkbox {
        padding-inline-end: 16px;
    }
}

.md-combobox-subheader {
    color: var(--mud-palette-action-default);
    background-color: var(--mud-palette-background);
    font-size: 0.875rem;
    box-sizing: border-box;
    list-style: none;
    font-weight: 500;
    padding-top: 16px;
    padding-bottom: 16px;
}

.md-combobox-subheader-secondary-background {
    background-color: var(--mud-palette-background-gray);
}

.md-combobox-subheader-gutters {
    padding-left: 16px;
    padding-right: 16px;
}

.md-combobox-subheader-inset {
    padding-left: 72px;
    padding-inline-start: 72px;
    padding-inline-end: unset;
}

.md-combobox-subheader-sticky {
    top: -8px;
    z-index: 1;
    position: sticky;

    &.md-combobox-subheader-sticky-dense {
        top: 0;
    }
}

.md-combobox-item-hilight {
    background-color: var(--mud-palette-background-gray);
}

.md-combobox-item-hilight {
    background-color: var(--mud-palette-lines-default) !important;
}

.md-combobox-item-bordered {
    border-left: 4px solid var(--mud-palette-lines-default);
    padding-inline-start: 12px;
}

@each $color in $mud-palette-colors {
    .md-combobox-item-bordered-#{$color} {
        border-left: 4px solid var(--mud-palette-#{$color});
        padding-inline-start: 12px;
    }
}

.md-combobox-item-nested-background {
    background-color: var(--mud-palette-background-gray);
}

.md-combobox-item-avatar {
    min-width: 56px;
    flex-shrink: 0;
}

.md-combobox-highlighter {
    background-color: transparent;
    font-weight: bold;
    text-decoration: underline;
}
